<?php
	 
	//Initialize Nebula Office framework
	require_once('../../system.php');
	
	//Load commonly used controls
	load_basic_controls();
	
	//Authenticate the user for the framework
	$GO_SECURITY->authenticate();
	
	//Authenticate the user for the module
	$GO_MODULES->authenticate('business');
	
	//Get the language variables
	require_once($GO_LANGUAGE->get_language_file('business'));
	
	//Require the module class
	require_once($GO_MODULES->class_path.'business.class.inc');
	require_once($GO_MODULES->class_path.'business_list.class.inc');
	$business = new business();
	$business_list = new business_list('business_list', $GO_SECURITY->user_id, false, true, 'business_form', $GO_MODULES->modules['business']['url']);
	// business头部需要包含的文件，一般为js文件
	$GO_HEADER['head'] = $business_list->get_header();	
	//Declare variables
	$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
	$link_back=$_SERVER['PHP_SELF'];
	
	$form = new form('business_form');
	$form->add_html_element(new input('hidden','task','',false));
	
	
	//create menu. The buttons are added in the include files.
	$menu = new button_menu();
	$menu->add_button('new_business',$lang_business['new_business'],'new_business.php');
	$menu->add_button('delete_business',$lang_business['delete_business'],'');
	
	$form->add_html_element($menu);
	$form->add_html_element($business_list);
	
	require($GO_THEME->theme_path.'header.inc');
	echo $form->get_html();
	require($GO_THEME->theme_path.'footer.inc');
	